from fastapi import APIRouter, HTTPException
from typing import Dict, Any
from .download_task_routes import router as task_router
from .download_progress_routes import router as progress_router
from .history_routes import router as history_router
from .download_statistics_routes import router as statistics_router
from .file_system_routes import router as file_system_router
from .preview_routes import router as preview_router
from src.models.download_models import DownloadRequest

# 创建主路由
router = APIRouter()

# 注册子路由
router.include_router(task_router, prefix="/download", tags=["download-task"])
router.include_router(progress_router, prefix="/download", tags=["download-progress"])
router.include_router(history_router, prefix="/history", tags=["history"])
router.include_router(statistics_router, prefix="/statistics", tags=["download-statistics"]) 
router.include_router(file_system_router, prefix="/file-system", tags=["file-system"]) 
router.include_router(preview_router, prefix="/preview", tags=["preview"])